#include <boost/asio.hpp>
#include <iostream>
using namespace boost::asio;

int a = 0;
void handler(const boost::system::error_code& error)
{
    a= 1;
}


int main()
{
    //tcp::socket sockets;
    boost::asio::io_context my_io_context;
    boost::asio::ip::tcp::endpoint ep(boost::asio::ip::tcp::v4(),6565);
    ip::tcp::socket TcpSockets(my_io_context);
    /*boost::asio::ip::tcp::resolver resolver(my_io_context);
    boost::asio::ip::tcp::resolver::query query("www.boost.org", "http");
    ip::tcp::resolver::iterator iter = resolver.resolve(query);
    ip::tcp::resolver::iterator end; // End marker.
    while (iter != end)
    {
        ip::tcp::endpoint endpoint = *iter++;
    }*/

    TcpSockets.async_connect(ep,handler);
    my_io_context.run();
    while(!a){}
}